/**
 * 格式化时间为易于观看时间
 * @return {string}
 */
function GoTimeFormat(date) {
    var year = date.getFullYear(),
        month = ("0" + (date.getMonth() + 1)).slice(-2),
        sdate = ("0" + date.getDate()).slice(-2),
        hour = ("0" + date.getHours()).slice(-2),
        minute = ("0" + date.getMinutes()).slice(-2),
        second = ("0" + date.getSeconds()).slice(-2);
    return year + "-" + month + "-" + sdate + " " + hour + ":" + minute + ":" + second;
}

/**
 * 格式化状态为字符串格式
 * @return {string}
 */
function GoStatusFormat(status) {
    if (status === 0)
        return '禁用';
    else
        return '可用';
}

/**
 * 格式化状态为HTML格式
 * @return {string}
 */
function GoStatusFormatHTML(status) {
    if (status === 0)
        return '<i class="layui-icon layui-icon-close-fill" style="font-size: 20px; color: #FF0000;"></i>';
    else
        return '<i class="layui-icon layui-icon-ok-circle" style="font-size: 20px; color: #0070FF;"></i>';
}

// 刷新页面
function ReloadLists() {
    setTimeout(function () {
        xadmin.father_reload();
        xadmin.close();
    }, 500)
}